/**
 * Beijing Jiaotong University
 * Copyright (c) 1896-2016 All Rights Reserved.
 */
package org.myws.busi.impl;

import javax.annotation.Resource;
import javax.jws.WebService;

import org.myws.dao.mybatis.domain.User;
import org.myws.facade.UserFacade;
import org.myws.service.UserService;
import org.myws.service.common.facade.dto.PageDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 
 * @author HuHui
 * @version $Id: UserFacadeImpl.java, v 0.1 2016年5月7日 下午9:45:42 HuHui Exp $
 */
@Component
@WebService(endpointInterface = "org.myws.facade.UserFacade")
public class UserFacadeImpl implements UserFacade {

    private static final Logger log = LoggerFactory.getLogger(UserFacadeImpl.class);

    @Resource
    private UserService         userService;

    @Override
    public User getUserById(Long id) {
        log.info("收到查询参数,id={}", id);
        User user = userService.getUserById(id);
        log.info("查询结果user={}", user);
        return user;
    }

    @Override
    public PageDTO<User> getUser(int pageNum, int pageSize) {
        return userService.getUser(pageNum, pageSize);
    }

}
